<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div id="app">
        <p v-pre>{{原样输出，即不解析}}</p>
        <button @click="msg">弹窗</button>
        <button v-on:click="msg">弹窗s</button>
        <button v-on:click="count++">{{count}}</button>
        <button @click="msg1">{{count1}}</button>
    </div>
    <script>
        let vm = new Vue({
            el: "#app",
            data: {
                count: 0,
                count1: 0
            },

            methods: {
                msg: function() {
                    let r = confirm('按下了按钮');
                    alert("欢迎来到vue.js");
                },
                msg1: function() {
                    this.count1 += 1;
                }

            }
        });
    </script>
</body>

</html>